﻿using System;

public class ConfirmPanelModel : BaseComponentModel
{
    private Action callback;
    public DataModel<string> textDM;

    public ConfirmPanelModel(Action callback, string text)
    {
        this.callback = callback;
        textDM = new DataModel<string>(text);
    }

    public void OnClickConfirm()
    {
        UIManager.CloseUI("ConfirmPanel");
        callback();
    }
    public void OnClickCancel()
    {
        UIManager.CloseUI("ConfirmPanel");
    }
}